using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace ShopForWeb.Model.Basic
{
  
 [Table("T_Order")]
   public partial class Order
  {
    /// <summary>
    /// 订单日期
    /// </summary>
  [StringLength(10)]
   public string OrderDate { get; set; } = "";

    /// <summary>
    /// 订单 ID，UID
    /// </summary>
  [Key]
  [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
   public string OrderId { get; set; } = "";

    /// <summary>
    /// 订单状态
    /// </summary>

   public int StatusCode { get; set; } = 1;

    /// <summary>
    /// 地址
    /// </summary>
   [StringLength(50)]
    public string TakeAddress { get; set; } = "";

    /// <summary>
    /// 收货人
    /// </summary>
   [StringLength(30)]
   public string TakeName { get; set; } = "";

    /// <summary>
    /// 收货电话
    /// </summary>
  [StringLength(11)]
   [Required]
    public string TakePhone { get; set; } = "";

    /// <summary>
    /// 总金额
    /// </summary>
  [Column(TypeName = "decimal(18,2)")]
  public decimal TotalAmount { get; set; }

    /// <summary>
    /// 用户 ID ，自增
    /// </summary>
  [ForeignKey("UserId")] 
   public long UserId { get; set; }
   public virtual User OwnUser { get; set; } = null!;
  
    }
}